import 'dart:io';

/// CreateTime 2020/4/26 11:12
/// CreateUser chen 
/// ProjectName flutter_elf
import 'package:flutter_elf/config/component_index.dart';
import 'package:path_provider/path_provider.dart';


class HotFixPage extends BaseWidget{
  @override
  BaseWidgetState<BaseWidget> getState() {
    // TODO: implement getState
    return HotFixPageState();
  }
}
class HotFixPageState extends BaseWidgetState<HotFixPage>{
  @override
  Widget buildView(BuildContext context) {
    // TODO: implement buildView
    return GestureDetector(
        onTap: ()async{
//            Directory d = await getTemporaryDirectory();
            var d = await getExternalStorageDirectories();
//            Directory d = await getExternalStorageDirectory();///storage/emulated/0/Android/data/com.elf.flutter_elf/files/flutter_elf.db
            globalPrint('====HotFixPage=====' + d.toString());
//            globalPrint(d[0].listSync().toString());
            Directory directory = Directory('/data/data/com.elf.flutter_elf/cache');
            globalPrint(directory.listSync().toString());
          },
        child: Container(
            height: 100,
            width: 100,
            color: Colors.lightBlue,
            child: Text('修复前')));
  }

  @override
  PreferredSizeWidget initAppbar() {
    // TODO: implement initAppbar
    return AppBarCreator.create(context, '修复');
  }
}